.SORT AlphaCS
Lbl POLAR
Fill(L1,50,0)
{|E9830}^^r->[r2]
Repeat (({[r2]}=5) or ({[r2]}=6)) and (({[r2]-7}>48) or (({[Y1]+5}) and ({[r2]-7}<28)))
	[r2]-{[r2]-6}-7->[r2]
	If [r2]<={|E982E}^^r
		Return0
	End
End
For([r3],1,{[r2]-6})
	{[r2]-6-[r3]}->{L1+[r3]-1}
End
[r2]-{[r2]-6}-7->[r2]
Repeat 0
	If (({[r2]}=5) or ({[r2]}=6)) and (({[r2]-7}>48) or (({[Y1]+5}) and ({[r2]-7}<28)))
		Fill(L2,50,0)
		For([r3],1,{[r2]-6}
			{[r2]-6-[r3]}->{L2+[r3]-1
		End
		0->[r3]
		Repeat ({L1+[r3]}!={L2+[r3]}) or ([r3]=20)
			[r3]++
		End
		If (({L1+[r3]}>{L2+[r3]}) and ([r1]=1)) or (({L1+[r3]}<{L2+[r3]}) and ([r1]=0))
			Fill(L1,50,0)
			Copy(L2,L1,20)
		End
		Else
		If [r2]<{|E982E}^^r
			sub(DATA)
			Return1
		End
	End
	[r2]-{[r2]-6}-7->[r2]
End
Lbl ADJ
Fill(L2,50,0)
Copy(L1+1,L2,20)
Fill(L1,50,0)
Copy(L2,L1)
Fill(L3,50,0)
Copy(L1,L3,20)
Fill(L1,50,0)
{|E9830}^^r->[r2]
sub(CHECK)
Repeat (({[r2]}=5) or ({[r2]}=6)) and ([r4]) and (({[r2]-7}>48) or ({[r2]-7}<28))
	[r2]-{[r2]-6}-7->[r2]
	If [r2]<{|E982E}^^r
		Fill(L1,50,0)
		Copy(L3,L1,20)
		Fill(L3,50,0)
		sub(DATA)
		Return0
	End
	sub(CHECK)
End
For([r3],1,{[r2]-6})
	{[r2]-6-[r3]}->{L1+[r3]-1}
End
[r2]-{[r2]-6}-7->[r2]
Repeat 0
	sub(CHECK)
	If (({[r2]}=5) or ({[r2]}=6)) and ([r4]) and (({[r2]-7}>48) or ({[r2]-7}<28))
		Fill(L2,50,0)
		For([r3],1,{[r2]-6}
			{[r2]-6-[r3]}->{L2+[r3]-1
		End
		0->[r3]
		Repeat ({L1+[r3]}!={L2+[r3]}) or ([r3]=20)
			[r3]++
		End
		If (({L1+[r3]}>{L2+[r3]}) and ([r1]=1)) or (({L1+[r3]}<{L2+[r3]}) and ([r1]=0))
			Fill(L1,50,0)
			Copy(L2,L1,20)
		End
		Else
		If [r2]<{|E982E}^^r
			sub(DATA)
			Return1
		End
	End
	[r2]-{[r2]-6}-7->[r2]
End
Lbl CHECK
0->[r4]
Repeat ({[r2]-7-[r4]}!={L3+[r4]}) or (([r4]>={[r2]-6}) and ({L3+[r4]}=0))
	[r4]++
End
If ((({[r2]-7-[r4]}<{L3+[r4]}) and ([r1]=1)) or (({[r2]-7-[r4]}>{L3+[r4]}) and ([r1]=0))) or (([r4]>={[r2]-6}) and ({L3+[r4]}=0))
	0->[r4]
	Else
	1->[r4]
End
Return
Lbl DATA
{|E9830}^^r->C
Repeat 0
	Repeat ({C}=5) or ({C}=6) and (({[r1]-7}>48) or ({[r1]-7}<28))
		C-{C-6}-7->C
	End
	Fill(L2,50,0)
	For([r1],1,{C-6})
		{C-6-[r1]}->{L2+[r1]-1}
	End
	!If Equ>String(L1,L2)
		If {C-5}=0
			0->D
			Else
			1->D
		End
		If {C-7}<28
			1->E
			Else
			0->E
		End
		If {C}=6
			1->F
			Else
			0->F
		End
		Fill(L2,50,0)
		Copy(L1,L2,20)
		Fill(L1,50,0)
		Copy(L2,L1+1,20)
		If E
			{L2}+64->{L2}
		End
		If F
			|E06->{L1}
			Else
			|E05->{L1}
		End
		Return
	End
	C-{C-6}-7->C
End
Return